[codex] update moq packages - #27
Conversation
There was a problem hiding this comment.
Sorry @kixelated, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR upgrades several Changes
Sequence Diagram(s)sequenceDiagram
participant Local
participant createPublishBroadcast
participant PublishBroadcast
participant WatchBroadcast
participant createWatchMetadata
Local->>createPublishBroadcast: construct broadcast with metadata props
createPublishBroadcast->>PublishBroadcast: attach user/location/chat/preview signals
createPublishBroadcast-->>Local: HangPublishBroadcast
WatchBroadcast->>createWatchMetadata: initialize with broadcast + props
createWatchMetadata->>PublishBroadcast: subscribeJson per catalog track
createWatchMetadata-->>WatchBroadcast: Metadata (location, chat, user)
Related PRs: None specified. Suggested labels: dependencies, refactor, room Suggested reviewers: None specified. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
app/src/room/preview/member.ts (2)
81-88: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate
ExtendedCatalogtype risks drifting from the canonical definition.
app/src/room/metadata.tsalready defines an equivalentExtendedCatalog = CatalogRoot & { hang?: HangCatalog }shape (withHangCatalog/TrackRefcovering user/location/chat/preview) thatcreateWatchMetadatarelies on for the samehang.preview.trackextraction. This file re-declares a narrower, local copy instead of importing it. If the metadata.ts shape changes (e.g.,TrackRefgains a field), this local copy won't be caught by the type checker and could silently diverge.Consider exporting the shared
ExtendedCatalog/HangCatalog/TrackReftypes from metadata.ts and importing them here instead of redefining locally.♻️ Proposed refactor sketch
-type ExtendedCatalog = Catalog.Root & { - hang?: { - preview?: { - track: string; - }; - }; -}; +import type { ExtendedCatalog } from "../metadata";(requires exporting
ExtendedCatalogfromapp/src/room/metadata.ts)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/room/preview/member.ts` around lines 81 - 88, The local ExtendedCatalog type in member.ts duplicates the canonical shape already defined in metadata.ts, so update this file to import and reuse the shared ExtendedCatalog/HangCatalog/TrackRef types instead of redefining them. Export the shared types from createWatchMetadata’s module if needed, and keep the hang.preview.track access working through the imported definition so future shape changes stay type-checked in one place.
48-53: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low valueExtract a named preview priority constant
0is valid, but a localPREVIEW_PRIORITYconstant would make the intent explicit and keep track priorities self-documenting.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/room/preview/member.ts` around lines 48 - 53, The preview subscription in Member’s signals effect uses a raw numeric priority, which hides intent. Extract that `0` value into a local named constant such as a preview priority near the `this.broadcast.subscribe(previewTrack, 0)` call, and use that symbol in the subscription so the priority is self-documenting and easy to update.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/room/watch.ts`:
- Around line 119-121: The watch metadata flow still exposes toggles in
WatchBroadcastProps that are not actually used by createWatchMetadata or
downstream watch behavior. Either wire location.window.enabled,
location.peers.enabled, chat.typing.enabled, and preview.enabled into the
watch-side logic in createWatchMetadata/broadcast.ts, or remove those unused
fields from the contract and keep only the toggle(s) that still affect behavior
such as chat.message.enabled.
---
Nitpick comments:
In `@app/src/room/preview/member.ts`:
- Around line 81-88: The local ExtendedCatalog type in member.ts duplicates the
canonical shape already defined in metadata.ts, so update this file to import
and reuse the shared ExtendedCatalog/HangCatalog/TrackRef types instead of
redefining them. Export the shared types from createWatchMetadata’s module if
needed, and keep the hang.preview.track access working through the imported
definition so future shape changes stay type-checked in one place.
- Around line 48-53: The preview subscription in Member’s signals effect uses a
raw numeric priority, which hides intent. Extract that `0` value into a local
named constant such as a preview priority near the
`this.broadcast.subscribe(previewTrack, 0)` call, and use that symbol in the
subscription so the priority is self-documenting and easy to update.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cd766c99-850f-47a1-856f-cf81d0e28575
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (13)
api/package.jsonapp/package.jsonapp/src/components/meme-selector.tsxapp/src/components/profile.tsxapp/src/controls.tsxapp/src/room/broadcast.tsapp/src/room/fake.tsapp/src/room/index.tsapp/src/room/local.tsapp/src/room/locator.tsapp/src/room/metadata.tsapp/src/room/preview/member.tsapp/src/room/watch.ts
| this.#metadata = createWatchMetadata(this.#broadcast, props); | ||
| this.location = this.#metadata.location; | ||
| this.chat = this.#metadata.chat; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Inspect createMetadata to see if it uses the enabled sub-flags
rg -n -B2 -A 40 'function createMetadata' app/src/room/metadata.tsRepository: moq-dev/hang.live
Length of output: 1628
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== watch.ts: createWatchMetadata and consumers =="
rg -n -B3 -A80 'createWatchMetadata|`#runLocation`|`#runChat`|`#runPreview`|hang\.location|hang\.chat|hang\.preview|enabled' app/src/room/watch.ts app/src/room/broadcast.ts
echo
echo "== metadata.ts: createMetadata shape =="
rg -n -B3 -A30 'function createMetadata|type MetadataProps|interface MetadataProps|type Metadata|interface Metadata' app/src/room/metadata.ts
echo
echo "== any direct use of enabled flags in room code =="
rg -n 'location\.(window|peers)\.enabled|chat\.(message|typing)\.enabled|preview\.enabled' app/src/roomRepository: moq-dev/hang.live
Length of output: 19580
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== createWatchMetadata =="
rg -n -B4 -A120 'function createWatchMetadata|createWatchMetadata\(' app/src/room/metadata.ts app/src/room/watch.ts
echo
echo "== all enabled-flag consumers in room code =="
rg -n 'location\.window\.enabled|location\.peers\.enabled|chat\.message\.enabled|chat\.typing\.enabled|preview\.enabled|user\.enabled' app/src/room
echo
echo "== watch/broadcast metadata propagation =="
rg -n -B2 -A25 'metadata\.|this\.location =|this\.chat =|this\.user =|this\.preview =|this\.video =|this\.audio =' app/src/room/watch.ts app/src/room/broadcast.ts app/src/room/metadata.tsRepository: moq-dev/hang.live
Length of output: 14686
Wire the remaining watch toggles or remove them from the contract app/src/room/metadata.ts:265-305
createWatchMetadata subscribes on hang.* presence only; location.window.enabled, location.peers.enabled, chat.typing.enabled, and preview.enabled are still exposed in WatchBroadcastProps but have no effect on the watch-side metadata flow. Only chat.message.enabled still gates behavior downstream in broadcast.ts.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/src/room/watch.ts` around lines 119 - 121, The watch metadata flow still
exposes toggles in WatchBroadcastProps that are not actually used by
createWatchMetadata or downstream watch behavior. Either wire
location.window.enabled, location.peers.enabled, chat.typing.enabled, and
preview.enabled into the watch-side logic in createWatchMetadata/broadcast.ts,
or remove those unused fields from the contract and keep only the toggle(s) that
still affect behavior such as chat.message.enabled.
Summary
@moq/jsontracks for user, location, chat, and preview dataValidation
bun run --filter="*" checkbun run --filter="*" buildNote:
just checkwas not available in this shell becausejustis not installed.